package com.atguigu.executorpool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @program: IDEAcode
 * @description:
 * @author: Mr.zjx
 * create: 2021-07-25-12-46
 **/
public class Test {
    public static void main(String[] args) {
        //创建线程池个数：2   接口ExecutorService接收
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        Runnable myRunnable = new MyRunnable();
        executorService.submit(myRunnable);
        executorService.submit(myRunnable);
    }
}
